\hypertarget{class_packet_port}{\section{Packet\+Port类 参考}
\label{class_packet_port}\index{Packet\+Port@{Packet\+Port}}
}


协议包端口类  




{\ttfamily \#include $<$Packet\+Port.\+h$>$}

类 Packet\+Port 继承关系图\+:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[height=2.000000cm]{class_packet_port}
\end{center}
\end{figure}
\subsection*{Public 成员函数}
\begin{DoxyCompactItemize}
\item 
\hypertarget{class_packet_port_a0942e8ed6807c39df80528291492e12d}{\hyperlink{class_i_o_device}{I\+O\+Device} $\ast$ {\bfseries get\+Port} ()}\label{class_packet_port_a0942e8ed6807c39df80528291492e12d}

\item 
sint32 \hyperlink{class_packet_port_ac90634a0db6968cc849d59aeb66a1dca}{bind} (\hyperlink{class_i_o_device}{I\+O\+Device} $\ast$device)
\begin{DoxyCompactList}\small\item\em 绑定端口设备 \end{DoxyCompactList}\item 
sint32 \hyperlink{class_packet_port_a407a6dfb2ba8f76a9ed76a5ee7f705ce}{unbind} ()
\begin{DoxyCompactList}\small\item\em 解绑端口设备 \end{DoxyCompactList}\item 
sint32 \hyperlink{class_packet_port_a18c0ea87a53f7c2eeb60393153b7b9cf}{send\+Packet} (const \hyperlink{class_c_packet}{C\+Packet} \&packet)
\begin{DoxyCompactList}\small\item\em 发送数据包 \end{DoxyCompactList}\item 
\hypertarget{class_packet_port_a45b7c294cde2bf09ea318d7c21fdb5f8}{virtual void {\bfseries recv\+Packet} (const char $\ast$buf, sint32 len)=0}\label{class_packet_port_a45b7c294cde2bf09ea318d7c21fdb5f8}

\end{DoxyCompactItemize}


\subsection{详细描述}
协议包端口类 

\begin{DoxyNote}{注解}
Packet\+Port仅负责从设备读取数据,拆包的任务交给子类实现 
\end{DoxyNote}


\subsection{成员函数说明}
\hypertarget{class_packet_port_ac90634a0db6968cc849d59aeb66a1dca}{\index{Packet\+Port@{Packet\+Port}!bind@{bind}}
\index{bind@{bind}!Packet\+Port@{Packet\+Port}}
\subsubsection[{bind}]{\setlength{\rightskip}{0pt plus 5cm}sint32 Packet\+Port\+::bind (
\begin{DoxyParamCaption}
\item[{{\bf I\+O\+Device} $\ast$}]{device}
\end{DoxyParamCaption}
)}}\label{class_packet_port_ac90634a0db6968cc849d59aeb66a1dca}


绑定端口设备 


\begin{DoxyParams}{参数}
{\em device} & I\+O设备 \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{返回}
成功返回\+S\+T\+A\+T\+U\+S\+\_\+\+O\+K,失败返回\+S\+T\+A\+T\+U\+S\+\_\+\+E\+R\+R\+O\+R 
\end{DoxyReturn}
\begin{DoxyNote}{注解}
none 
\end{DoxyNote}
\hypertarget{class_packet_port_a18c0ea87a53f7c2eeb60393153b7b9cf}{\index{Packet\+Port@{Packet\+Port}!send\+Packet@{send\+Packet}}
\index{send\+Packet@{send\+Packet}!Packet\+Port@{Packet\+Port}}
\subsubsection[{send\+Packet}]{\setlength{\rightskip}{0pt plus 5cm}sint32 Packet\+Port\+::send\+Packet (
\begin{DoxyParamCaption}
\item[{const {\bf C\+Packet} \&}]{packet}
\end{DoxyParamCaption}
)}}\label{class_packet_port_a18c0ea87a53f7c2eeb60393153b7b9cf}


发送数据包 


\begin{DoxyParams}{参数}
{\em packet} & 数据包 \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{返回}
成功返回发送的字节数,失败返回\+S\+T\+A\+T\+U\+S\+\_\+\+E\+R\+R\+O\+R 
\end{DoxyReturn}
\begin{DoxyNote}{注解}
none 
\end{DoxyNote}
\hypertarget{class_packet_port_a407a6dfb2ba8f76a9ed76a5ee7f705ce}{\index{Packet\+Port@{Packet\+Port}!unbind@{unbind}}
\index{unbind@{unbind}!Packet\+Port@{Packet\+Port}}
\subsubsection[{unbind}]{\setlength{\rightskip}{0pt plus 5cm}sint32 Packet\+Port\+::unbind (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)}}\label{class_packet_port_a407a6dfb2ba8f76a9ed76a5ee7f705ce}


解绑端口设备 


\begin{DoxyParams}{参数}
{\em none} & \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{返回}
成功返回\+S\+T\+A\+T\+U\+S\+\_\+\+O\+K,失败返回\+S\+T\+A\+T\+U\+S\+\_\+\+E\+R\+R\+O\+R 
\end{DoxyReturn}
\begin{DoxyNote}{注解}
none 
\end{DoxyNote}


该类的文档由以下文件生成\+:\begin{DoxyCompactItemize}
\item 
libemb/inc/\hyperlink{_packet_port_8h}{Packet\+Port.\+h}\item 
libemb/src/Packet\+Port.\+cpp\end{DoxyCompactItemize}
